﻿using RTW.Entity.CustomAttributes;
using RTW.OA.Areas.Common.Servers;
using System;

namespace RTW.OA.Models
{
    public class official_document_borrow
    {
        /// <summary>
        /// 文档编号
        /// </summary>
        public int DOC_ID { get; set; }
        /// <summary>
        /// 申请人名称
        /// </summary>
        public string PROPOSER_USER_NAME { get; set; }
        /// <summary>
        /// 借阅天数
        /// </summary>
        public int DAYS { get; set; }
        /// <summary>
        /// 借阅理由
        /// </summary>
        public string REASON { get; set; }
        /// <summary>
        /// 申请状态
        /// </summary>
        public int STATUS { get; set; }
        /// <summary>
        /// 审批人用户名
        /// </summary>
        public string APPROVAL_NO { get; set; }
        /// <summary>
        /// 审批人名称
        /// </summary>
        public string APPROVAL_NAME { get; set; }
        /// <summary>
        /// 审批备注
        /// </summary>
        public string APPROVAL_REMARK { get; set; }
        /// <summary>
        /// 审批时间
        /// </summary>
        public DateTime? APPROVAL_TIME { get; set; }
        /// <summary>
        /// 申请时间
        /// </summary>
        public DateTime CREATE_TIME { get; set; }
        /// <summary>
        /// 申请人用户名
        /// </summary>
        public string CREATE_USER_NO { get; set; }
        [IgnoreColumn]
        public bool IsAllowRead { get; set; }
        /// <summary>
        /// 借阅编号
        /// </summary>
        [Id(CheckAutoId = true)]
        public int BORROW_ID { get; set; }

        [IgnoreColumn]
        public official_document official_document
        {
            get
            {
                DocumentServers documentServers = new DocumentServers();
                return documentServers.GetModelById(this.DOC_ID);
            }
        }
    }
}